using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Admin.IdentifyWinners
{
    class SystrayHelper
    {
        public static void ShowWindow(Form f)
        {
            f.Show();
            f.WindowState = FormWindowState.Normal;
        }

        public static void MinimizeToSystray(Form f, NotifyIcon sys)
        {
            if (FormWindowState.Minimized == f.WindowState)
            {
                sys.Visible = true;
                sys.ShowBalloonTip(500);
                f.Hide();
            }
            else if (FormWindowState.Normal == f.WindowState)
            {
                sys.Visible = false;
            }
        }
    }
}
